// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import App from './App'
import router from './router'
import store from './store'
import  { ToastPlugin } from 'vux'
import { AjaxPlugin } from 'vux'
Vue.use(AjaxPlugin)
/*
AjaxPlugin.$http.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
AjaxPlugin.$http.interceptors.request.use((config) => {
  if (config.method === 'post') {
    config.data = qs.stringify(config.data)
  }
  return config
}, (error) => {
  return error
})
*/
import { domain, count, prettyDate,date,datetime,int,fix,money,sub} from './filters'

Vue.filter('count', count)
Vue.filter('domain', domain)
Vue.filter('prettyDate', prettyDate)
Vue.filter('date', date)
Vue.filter('datetime', datetime)

Vue.filter('int', int)
Vue.filter('fix', fix)
Vue.filter('money', money)
Vue.filter('sub', sub)
Vue.use(ToastPlugin)



FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app-box')
